]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
UserMenu: don't show a lock icon when we're not actually locked
authorGiovanni Campagna <gcampagna@src.gnome.org>
Sat, 2 Feb 2013 16:30:06 +0000 (17:30 +0100)
committerGiovanni Campagna <gcampagna@src.gnome.org>
Sun, 3 Feb 2013 13:59:58 +0000 (14:59 +0100)
The screen shield can now be active (forcing the lock-screen session mode)
without being locked.

https://bugzilla.gnome.org/show_bug.cgi?id=693007

js/ui/userMenu.js

index 40710a52332bd275ecff948fdf56e736594c29ef..1ead590ed15cda4970d0533a698099f255d60a91 100644 (file)
@@ -585,6 +585,7 @@ const UserMenuButton = new Lang.Class({
                                        Lang.bind(this, this._updateHaveShutdown));
 
         Main.sessionMode.connect('updated', Lang.bind(this, this._sessionUpdated));
+        Main.screenShield.connect('locked-changed', Lang.bind(this, this._updatePresenceIcon));
         this._sessionUpdated();
     },
 
@@ -704,6 +705,11 @@ const UserMenuButton = new Lang.Class({
             this._iconBox.child = this._idleIcon;
         else
             this._iconBox.child = this._offlineIcon;
+
+        if (Main.sessionMode.isLocked)
+            this._iconBox.visible = Main.screenShield.locked;
+        else
+            this._iconBox.visible = true;
     },
 
     _setupAccounts: function() {